<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>libnoise: Documentation</title>
  <link rel='stylesheet' type='text/css' href='doxygen.css'>
  <meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
 </head>
 <body>
  <table class='layout'>
   <tr>
    <td class='sidebar' rowspan='2'>
     <p>
      Navigation menu
     </p>
     <ul class='toc'>
      <li>
       <a href='http://libnoise.sourceforge.net/index.html'>Main</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/downloads/index.html'>Downloads</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/coherentnoise/index.html'>What is coherent noise?</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/noisegen/index.html'>Generating coherent noise</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/glossary/index.html'>Glossary</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/examples/index.html'>Examples</a>
       <ul class='toc'>
        <li>
         <a href='http://libnoise.sourceforge.net/examples/textures/index.html'>Procedural textures</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/examples/complexplanet/index.html'>Complex planetary surface</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/examples/worms/index.html'>Perlin worms</a>
        </li>
       </ul>
      </li>
      <li>
       <strong>Docs</strong>
      </li>
      <li>
       <a href='tutorials/index.html'>Tutorials</a>
       <ul class='toc'>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial1.html'>Tutorial 1</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial2.html'>Tutorial 2</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial3.html'>Tutorial 3</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial4.html'>Tutorial 4</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial5.html'>Tutorial 5</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial6.html'>Tutorial 6</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial7.html'>Tutorial 7</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial8.html'>Tutorial 8</a>
        </li>
       </ul>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/cvs/index.html'>CVS</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/links/index.html'>Links</a>
      </li>
     </ul>
    </td>
    <td class='header'>
     <p>
      <img src='libnoise.png' alt='libnoise logo'>
     </p>   
     <p>
      A portable, open-source, coherent noise-generating library for C++
     </p>
     <hr>
    </td>
   </tr>
   <tr>
    <td class='content'>

<!-- start rich gooey content -->
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
<h1>noise::module::Terrace Class Reference<br>
<small>
[<a class="el" href="group__modifiermodules.html">Modifier Modules</a>]</small>
</h1><code>#include &lt;<a class="el" href="terrace_8h-source.html">terrace.h</a>&gt;</code>
<p>
<p>Inheritance diagram for noise::module::Terrace:
<p><center><img src="classnoise_1_1module_1_1Terrace.png" usemap="#noise::module::Terrace_map" border="0" alt=""></center>
<map name="noise::module::Terrace_map">
<area href="classnoise_1_1module_1_1Module.html" alt="noise::module::Module" shape="rect" coords="0,0,139,24">
</map>
<a href="classnoise_1_1module_1_1Terrace-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Noise module that maps the output value from a source module onto a terrace-forming curve. 
<p>
<div align="center">
<img src="moduleterrace.png" alt="moduleterrace.png">
</div>
<p>
This noise module maps the output value from the source module onto a terrace-forming curve. The start of this curve has a slope of zero; its slope then smoothly increases. This curve also contains <em>control points</em> which resets the slope to zero at that point, producing a "terracing" effect. Refer to the following illustration:<p>
<div align="center">
<img src="terrace.png" alt="terrace.png">
</div>
<p>
To add a control point to this noise module, call the <a class="el" href="classnoise_1_1module_1_1Terrace.html#a2">AddControlPoint()</a> method.<p>
An application must add a minimum of two control points to the curve. If this is not done, the <a class="el" href="classnoise_1_1module_1_1Terrace.html#a9">GetValue()</a> method fails. The control points can have any value, although no two control points can have the same value. There is no limit to the number of control points that can be added to the curve.<p>
This noise module clamps the output value from the source module if that value is less than the value of the lowest control point or greater than the value of the highest control point.<p>
This noise module is often used to generate terrain features such as your stereotypical desert canyon.<p>
This noise module requires one source module. 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0" doxytag="noise::module::Terrace::Terrace"></a>
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a0">Terrace</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="noise::module::Terrace::~Terrace"></a>
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a1">~Terrace</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a2">AddControlPoint</a> (double value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a control point to the terrace-forming curve.  <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a3">ClearAllControlPoints</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes all the control points on the terrace-forming curve.  <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const double *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a4">GetControlPointArray</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a pointer to the array of control points on the terrace-forming curve.  <a href="#a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a5">GetControlPointCount</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of control points on the terrace-forming curve.  <a href="#a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a6">GetSourceModuleCount</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of source modules required by this noise module.  <a href="#a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a7">InvertTerraces</a> (bool invert=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enables or disables the inversion of the terrace-forming curve between the control points.  <a href="#a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a8">IsTerracesInverted</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines if the terrace-forming curve between the control points is inverted.  <a href="#a8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a9">GetValue</a> (double x, double y, double z) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates an output value given the coordinates of the specified input value.  <a href="#a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#a10">MakeControlPoints</a> (int controlPointCount)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a number of equally-spaced control points that range from -1 to +1.  <a href="#a10"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#b0">FindInsertionPos</a> (double value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines the array index in which to insert the control point into the internal control point array.  <a href="#b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#b1">InsertAtPos</a> (int insertionPos, double value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inserts the control point at the specified position in the internal control point array.  <a href="#b1"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p0" doxytag="noise::module::Terrace::m_controlPointCount"></a>
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#p0">m_controlPointCount</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of control points stored in this noise module. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1" doxytag="noise::module::Terrace::m_invertTerraces"></a>
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#p1">m_invertTerraces</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines if the terrace-forming curve between all control points is inverted. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p2" doxytag="noise::module::Terrace::m_pControlPoints"></a>
double *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Terrace.html#p2">m_pControlPoints</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Array that stores the control points. <br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a2" doxytag="noise::module::Terrace::AddControlPoint"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void Terrace::AddControlPoint           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">double&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>value</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Adds a control point to the terrace-forming curve. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>The value of the control point to add.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Precondition:</b></dt><dd>No two control points have the same value.</dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>noise::ExceptionInvalidParam</em>&nbsp;</td><td>An invalid parameter was specified; see the preconditions for more information.</td></tr>
  </table>
</dl>
Two or more control points define the terrace-forming curve. The start of this curve has a slope of zero; its slope then smoothly increases. At the control points, its slope resets to zero.<p>
It does not matter which order these points are added.     </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="noise::module::Terrace::ClearAllControlPoints"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void Terrace::ClearAllControlPoints           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Deletes all the control points on the terrace-forming curve. 
<p>
<dl compact><dt><b>Postcondition:</b></dt><dd>All control points on the terrace-forming curve are deleted. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="b0" doxytag="noise::module::Terrace::FindInsertionPos"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int Terrace::FindInsertionPos           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">double&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>value</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Determines the array index in which to insert the control point into the internal control point array. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>The value of the control point.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The array index in which to insert the control point.</dd></dl>
<dl compact><dt><b>Precondition:</b></dt><dd>No two control points have the same value.</dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>noise::ExceptionInvalidParam</em>&nbsp;</td><td>An invalid parameter was specified; see the preconditions for more information.</td></tr>
  </table>
</dl>
By inserting the control point at the returned array index, this class ensures that the control point array is sorted by value. The code that maps a value onto the curve requires a sorted control point array.     </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="noise::module::Terrace::GetControlPointArray"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const double* noise::module::Terrace::GetControlPointArray           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a pointer to the array of control points on the terrace-forming curve. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>A pointer to the array of control points in this noise module.</dd></dl>
Two or more control points define the terrace-forming curve. The start of this curve has a slope of zero; its slope then smoothly increases. At the control points, its slope resets to zero.<p>
Before calling this method, call <a class="el" href="classnoise_1_1module_1_1Terrace.html#a5">GetControlPointCount()</a> to determine the number of control points in this array.<p>
It is recommended that an application does not store this pointer for later use since the pointer to the array may change if the application calls another method of this object.     </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="noise::module::Terrace::GetControlPointCount"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int noise::module::Terrace::GetControlPointCount           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the number of control points on the terrace-forming curve. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The number of control points on the terrace-forming curve. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a6" doxytag="noise::module::Terrace::GetSourceModuleCount"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual int noise::module::Terrace::GetSourceModuleCount           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the number of source modules required by this noise module. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The number of source modules required by this noise module. </dd></dl>

<p>
Implements <a class="el" href="classnoise_1_1module_1_1Module.html#a3">noise::module::Module</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a9" doxytag="noise::module::Terrace::GetValue"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">double Terrace::GetValue           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">double&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>z</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Generates an output value given the coordinates of the specified input value. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>The <em>x</em> coordinate of the input value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>y</em>&nbsp;</td><td>The <em>y</em> coordinate of the input value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>z</em>&nbsp;</td><td>The <em>z</em> coordinate of the input value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The output value.</dd></dl>
<dl compact><dt><b>Precondition:</b></dt><dd>All source modules required by this noise module have been passed to the <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a> method.</dd></dl>
Before an application can call this method, it must first connect all required source modules via the <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a> method. If these source modules are not connected to this noise module, this method raises a debug assertion.<p>
To determine the number of source modules required by this noise module, call the <a class="el" href="classnoise_1_1module_1_1Terrace.html#a6">GetSourceModuleCount()</a> method. 
<p>
Implements <a class="el" href="classnoise_1_1module_1_1Module.html#a4">noise::module::Module</a>.    </td>
  </tr>
</table>
<a class="anchor" name="b1" doxytag="noise::module::Terrace::InsertAtPos"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void Terrace::InsertAtPos           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap> <em>insertionPos</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Inserts the control point at the specified position in the internal control point array. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>insertionPos</em>&nbsp;</td><td>The zero-based array position in which to insert the control point. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>The value of the control point.</td></tr>
  </table>
</dl>
To make room for this new control point, this method reallocates the control point array and shifts all control points occurring after the insertion position up by one.<p>
Because the curve mapping algorithm in this noise module requires that all control points in the array be sorted by value, the new control point should be inserted at the position in which the order is still preserved.     </td>
  </tr>
</table>
<a class="anchor" name="a7" doxytag="noise::module::Terrace::InvertTerraces"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void noise::module::Terrace::InvertTerraces           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>invert</em> = <code>true</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Enables or disables the inversion of the terrace-forming curve between the control points. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>invert</em>&nbsp;</td><td>Specifies whether to invert the curve between the control points. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a8" doxytag="noise::module::Terrace::IsTerracesInverted"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">bool noise::module::Terrace::IsTerracesInverted           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Determines if the terrace-forming curve between the control points is inverted. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li><em>true</em> if the curve between the control points is inverted.</li><li><em>false</em> if the curve between the control points is not inverted. </li></ul>
</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a10" doxytag="noise::module::Terrace::MakeControlPoints"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void Terrace::MakeControlPoints           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>controlPointCount</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates a number of equally-spaced control points that range from -1 to +1. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>controlPointCount</em>&nbsp;</td><td>The number of control points to generate.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Precondition:</b></dt><dd>The number of control points must be greater than or equal to 2.</dd></dl>
<dl compact><dt><b>Postcondition:</b></dt><dd>The previous control points on the terrace-forming curve are deleted.</dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>noise::ExceptionInvalidParam</em>&nbsp;</td><td>An invalid parameter was specified; see the preconditions for more information.</td></tr>
  </table>
</dl>
Two or more control points define the terrace-forming curve. The start of this curve has a slope of zero; its slope then smoothly increases. At the control points, its slope resets to zero.     </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="terrace_8h-source.html">terrace.h</a><li>terrace.cpp</ul>
<!-- end rich gooey content -->

    </td>
   </tr>
   <tr>
    <td class='footer' colspan='2'>
     <p>
      &copy; 2003-2005 Jason Bevins
     </p>
     <p>
      <a href='http://www.doxygen.org/'><img src='doxygen.png' alt='Doxygen logo'></a>
      <br>
      The libnoise source documentation was generated by <a href='http://www.doxygen.org/'>doxygen</a> 1.3.9.1
     </p>
    </td>
   </tr>
  </table>
 </body>
</html>
